package cn.opencodes.framework.core.shiro;


import org.apache.shiro.authc.AuthenticationToken;

/**
 * token
 * @author HJ
 */
public class AuthcTokenBean implements AuthenticationToken {
	private static final long serialVersionUID = 3599691940428409833L;
	private String token;
	private long userId;

    public AuthcTokenBean(long userId, String token){
    	this.userId = userId;
        this.token = token;
    }

    @Override
    public String getPrincipal() {
        return String.valueOf(userId);
    }

    @Override
    public Object getCredentials() {
        return token;
    }
    
}
